-
Notifications
You must be signed in to change notification settings - Fork 8.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] Display warning if clone job fails due to missing data view #117993
[ML] Display warning if clone job fails due to missing data view #117993
Conversation
Pinging @elastic/ml-ui (:ml) |
values: { jobId, dataViewTitle }, | ||
} | ||
); | ||
getToastNotifications().addDanger({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we use getToastNotificationService
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched this one to getToastNotificationService
in b67a413.
public async assertNoDataViewForCloneJobWarningToastExist() { | ||
await retry.tryForTime(5000, async () => { | ||
const toast = await testSubjects.find('mlCloneJobNoDataViewExistsWarningToast'); | ||
expect(toast).not.to.be(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to check the content of the toast?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's ok just to check the data-test-subj
for now, and this is in line with other tests we have for toast notifications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I think we can replace getToastNotifications
with getToastNotificationService
in a separate PR for the entire file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and the fix worked fine.
Just two comments / suggestions for the test.
x-pack/test/functional/apps/ml/anomaly_detection/single_metric_job.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⚡
f6e1656
to
ae935aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
…stic#117993) * [ML] Display warning if clone job fails due to missing data view * [ML] Edits following review Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…7993) * [ML] Display warning if clone job fails due to missing data view * [ML] Edits following review Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Fixes regression introduced by #116455, adding back the warning toast if cloning an anomaly detection job fails because there is no data view matching the indices used in the datafeed.
Also adds a new functional test which would have caught the original regression.
Checklist
Fixes #117834